﻿using DocumentFormat.OpenXml.Lite.DrawingML.Base;
using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Transformation;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Geometry
{
    [XmlRoot("graphicFrame", Namespace = Constants.Main)]
    public class GraphicFrame : XmlSerializable, IGroupShape
    {
        [XmlElement("nvGraphicFramePr", Namespace = Constants.Main)]
        public NonVisualGraphicFrameProperties NonVisualProperties { get; set; }

        [XmlElement("graphic", Namespace = Constants.Main)]
        public Graphic Graphic { get; set; }

        [XmlElement("xfrm", Namespace = Constants.Main)]
        public Transform2d Transform2d { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Main)]
        public ExtensionList ExtensionList { get; set; }

        public GraphicFrame() { }
    }

    [XmlRoot("graphic", Namespace = Constants.Main)]
    public class Graphic : XmlSerializable
    {
        [XmlElement("graphicData", Namespace = Constants.Main)]
        public GraphicData Data { get; set; }

        public Graphic() { }
    }

    [XmlRoot("graphicData", Namespace = Constants.Main)]
    public class GraphicData : XmlSerializable
    {
        [Optional]
        [XmlAttribute("uri", Form = XmlSchemaForm.Qualified)]
        public string Uri { get; set; }

        public GraphicData() { }
    }
}
